package org.shan.hangtian.utils;

import java.io.File;

/**
 * Created by amanda.shan on 2020/10/8.
 */
public class PathUtils {

    public static String getPath(String fileName){
        String filePath;
        if (PathUtils.class.getResource("/") != null){
            filePath = PathUtils.class.getResource("/").getPath() + fileName;
            if (!new File(filePath).exists()){
                filePath = fileName;
            }
        }else{
            filePath = fileName;
        }

        return filePath;
    }
}
